<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="baidu-site-verification" content="SCzNOI2Wq6" />
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>
        daozhuang
    </title>
    
<link rel="stylesheet" href="/libs/highlight/styles/monokai-sublime.css">

    
<link rel="stylesheet" href="/libs/font-awesome/css/font-awesome.min.css">

    
<link rel="stylesheet" href="/css/style.css">

<meta name="generator" content="Hexo 4.2.1"></head>

<body id="bodyx">
    <div class="hd posts">
    <a href="/index.html"><i class="fa fa-reply replay-btn" aria-hidden="true"></i></a>
    <div class="post-title">
        <p>
            Alibaba Cloud Toolkit 插件一键部署
        </p>
        <hr>
    </div>
    <div class="post-content">
        <h4 id="在idea中使用-Alibaba-Cloud-Toolkit-插件"><a href="#在idea中使用-Alibaba-Cloud-Toolkit-插件" class="headerlink" title="在idea中使用 Alibaba Cloud Toolkit 插件"></a>在idea中使用 Alibaba Cloud Toolkit 插件</h4><p><img src="https://img-blog.csdnimg.cn/20200804105729539.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl8zNzg2NTMxMg==,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"></p>
<ol>
<li>在idea中安装Alibaba Cloud Toolkit 插件</li>
</ol>
<p><strong>Preferences  —–&gt;  Plugins  —–&gt;  Marketplace 搜索 Alibaba Cloud Toolkit 然后 install 重启 idea</strong><br>2. 打开 alibaba cloud view 界面添加  服务器地址 host<br><img src="https://img-blog.csdnimg.cn/20200804102640311.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl8zNzg2NTMxMg==,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br>3. 配置自动打包上传部署</p>
<p><img src="https://img-blog.csdnimg.cn/20200804104054323.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl8zNzg2NTMxMg==,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br><img src="https://img-blog.csdnimg.cn/20200804104511711.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl8zNzg2NTMxMg==,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"></p>
<p><img src="https://img-blog.csdnimg.cn/20200804104643218.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl8zNzg2NTMxMg==,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br>编写 stop.sh 脚本  以便上传前 结束正在运行的程序</p>
<figure class="highlight powershell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#!/bin/sh</span></span><br><span class="line"></span><br><span class="line">APP_NAME=<span class="string">"education-0.0.1-SNAPSHOT"</span></span><br><span class="line"></span><br><span class="line">tpid=`ps <span class="literal">-ef</span>|grep <span class="variable">$</span>&#123;APP_NAME&#125;|grep <span class="literal">-v</span> grep|grep <span class="literal">-v</span> kill|awk <span class="string">'&#123;print $2&#125;'</span>`</span><br><span class="line"><span class="keyword">if</span> [[ <span class="variable">$</span>&#123;<span class="type">tpid</span>&#125; ]]; then</span><br><span class="line">    echo <span class="string">'Stop Process...'</span></span><br><span class="line">    kill <span class="literal">-15</span> <span class="variable">$</span>&#123;tpid&#125;</span><br><span class="line"><span class="keyword">else</span></span><br><span class="line">     echo <span class="string">"error: <span class="variable">$</span>&#123;APP_NAME&#125; not found"</span></span><br><span class="line">     <span class="keyword">exit</span> <span class="number">1</span></span><br><span class="line">fi</span><br><span class="line"></span><br><span class="line">sleep <span class="number">5</span></span><br><span class="line"></span><br><span class="line">tpid=`ps <span class="literal">-ef</span>|grep <span class="variable">$</span>&#123;APP_NAME&#125;|grep <span class="literal">-v</span> grep|grep <span class="literal">-v</span> kill|awk <span class="string">'&#123;print $2&#125;'</span>`</span><br><span class="line"><span class="keyword">if</span> [[ <span class="variable">$</span>&#123;<span class="type">tpid</span>&#125; ]]; then</span><br><span class="line">    echo <span class="string">'Kill Process!'</span></span><br><span class="line">    kill <span class="literal">-9</span> <span class="variable">$</span>&#123;tpid&#125;</span><br><span class="line"><span class="keyword">else</span></span><br><span class="line">    echo <span class="string">'Stop Success!'</span></span><br><span class="line">fi</span><br></pre></td></tr></table></figure>


    </div>

    
        <hr class="fhr">
        <div id="vcomments"></div>
    
</div>
    <div class="footer" id="footer">
    <p>Copyright © 2020 <a class="flink" href="https://hexo.io" target="_blank" rel="noopener">Hexo</a>-<a class="flink" href="https://github.com/sanjinhub/hexo-theme-geek" target="_blank" rel="noopener">Geek</a>.
        <label class="el-switch el-switch-green el-switch-sm" style="vertical-align: sub;">
            <input type="checkbox" name="switch" id="update_style">
            <span class="el-switch-style"></span>
        </label>
<!--         <script type="text/javascript">
        var cnzz_protocol = (("https:" == document.location.protocol) ? "https://" : "http://");
        document.write(unescape("%3Cspan id='cnzz_stat_icon_1278548644'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "v1.cnzz.com/stat.php%3Fid%3D1278548644%26show%3Dpic1' type='text/javascript'%3E%3C/script%3E"));
        </script> -->
    </p>
</div>
<input type="hidden" id="web_style" value="black">
<input type="hidden" id="valine_appid" value="c994h5wXLa8fSMa424BTyVhs-gzGzoHsz">
<input type="hidden" id="valine_appKey" value="4tFbwCi4sYo3yRFgiNFpQd4N">

<script src="/libs/jquery.min.js"></script>


<script src="/libs/highlight/highlight.pack.js"></script>

<script src='//cdn.jsdelivr.net/npm/valine@1.3.10/dist/Valine.min.js'></script>

<script src="/js/js.js"></script>

<style type="text/css">
.v * {
    color: #698fca;
}

.v .vlist .vcard .vhead .vsys {
    color: #3a3e4a;
}

.v .vlist .vcard .vh .vmeta .vat {
    color: #638fd5;
}

.v .vlist .vcard .vhead .vnick {
    color: #6ba1ff;
}

.v a {
    color: #8696b1;
}

.v .vlist .vcard .vhead .vnick:hover {
    color: #669bfc;
}
</style>
</body>

</html>